<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php");
	include("function/function.php");
	
	$newsid = trim($_REQUEST['newsid']);
	if(is_numeric($newsid)){
		$sql="select * from kboy_news where news_language=1 and id=$newsid";
		$rows=mysql_query($sql);
		$nums=mysql_num_rows($rows);
		if($nums>0){
			$rs=mysql_fetch_array($rows);
				$news_title = $rs['news_title'];
				$news_writer = $rs['news_writer'];
				$news_from = $rs['news_from'];
				$news_pic = $rs['news_pic'];
				$news_bigclass = $rs['news_bigclass'];
				$classid = $rs['news_bigclass'];
				$news_addtime = $rs['news_addtime'];
				$news_content = stripslashes($rs['news_content']);
				$news_keywords = $rs['news_keywords'];
				$classid = $rs['news_bigclass'];
				$news_hit = $rs['news_hit'];
				$news_tourls = $rs['news_tourls'];
		}else{
			echo erro("该信息已被删除或不存在");
		}
	}else{
		echo erro("该信息已被删除或不存在");
	}
	
	$sql="select * from kboy_bigclass where id=$news_bigclass";
	$rows=mysql_query($sql);
	$nums=mysql_num_rows($rows);
	if($nums>0){
		$rs=mysql_fetch_array($rows);
		$bigclass_cn = $rs['bigclass_cn'];
		
	}else{
		echo erro("该信息已被删除或不存在");
	}
	
	if($news_tourls){ // 设置转页
		echo "<meta http-equiv=\"Refresh\" content=\"0;URL=".$news_tourls."\" />";
		echo re($news_tourls);
	}
	
	// 获取父ID串
	$replace_str = "1,2,3";
	getFatherID($classid,"");
	$getFatherID = $getFatherID . ",";
	$EXarr = explode(',',$replace_str);
	foreach($EXarr as $u){
		$rep_str = ','.$u.",";
		$getFatherID = str_replace($rep_str,'',$getFatherID);
	}
	$getFatherID = rtrim(ltrim($getFatherID,','),',');
	if(strlen($getFatherID)>0){
		$Farr = array_reverse(explode(",",$getFatherID));
		$FarrNum = $Farr[0];
	}
	mysql_query("update kboy_news set news_hit = news_hit + 1 where id=$newsid");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?= $news_title ?>_<?= $web_titles?></title>
<meta name="Keywords" content="<?= $news_title ?>,<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/style.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
</head>
<body>
  <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
  <!--top-bar end-->
  <!--header begin-->
	<? include("_include.top.navbar.php") ?>
  <!--header end-->
    <!--banner begin-->
    <div class="inner-banner1">
        <div class="inner-pic"><img src="images/ban1.jpg" alt=""/></div>
        <!--<div class="search-wap">
            <div class="search-box">
			<form name="SearchForm" id="SearchForm" method="post" action="active_search.php">
                <input type="text" class="search-text input_wby" holdplace="搜索目的地/攻略/活动" name="search_text"/>
                <input type="submit" class="search-send" value=""/>
				</form>
            </div>
        </div>-->
    </div>
    <!--banner end-->
    <!--活动 begin-->
    <div class="f-item-box np">
        <div class="content">
            <div class="breadcrumb">
				<?php
						if(strlen($getFatherID)>0){
							$arr = explode(",",$getFatherID); 
							foreach(array_reverse($arr) as $v){ 
								echo "<a href=\"".getClassName("kboy_bigclass","bigclass_urls","id=$v")."\">".getClassName("kboy_bigclass","bigclass_cn","id=$v")."</a> > ";  
							} 
						}
				?>
			
			</div>
            <div class="bd-content">
                <div class="con-pane on">
                    <div class="mdd-box">
                        <div class="case_con">
                            <h3><?=$news_title?></h3>
                            <div class="case_con_in">
                                <?=$news_content?>
                            </div>
                        </div>
                        <div class="hot-pl">
                            <h3 class="pl-title"><a href="javascript:;">推荐目的地</a></h3>
                            <div class="destina-list">
			<?php
					$news_sql = "select * from kboy_trailfoot order by id desc limit 5";
					$news_rows = mysql_query($news_sql);
					while($news_rs = mysql_fetch_array($news_rows)){
			?>
			<dl>
				<dt><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><img src="<?=$news_rs['trailfoot_pic']?>" width="90" height="82" alt=""/></a></dt>
				<dd>
					<h3><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><?=$news_rs['trailfoot_title']?></a></h3>
					<p><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><?=$news_rs['trailfoot_line']?><?=$news_rs['trailfoot_allline']?></a></p>
				</dd>
			</dl>
			<?php
					}
			?>
								
                            </div>
                            <h3 class="pl-title"><a href="javascript:;">精彩点评</a></h3>
                            <div class="hot-pl-list">
		<?php
				$news_sql = "select * from kboy_trailfoot_message order by id desc limit 4";
				$news_rows = mysql_query($news_sql);
				while($news_rs = mysql_fetch_array($news_rows)){
		?>
			<div class="hot-pl-item">
				<div class="hd-pl">
					<dl>
						<dt><a href="forum_news.php?uid=<?=$news_rs['uid']?>" target="_blank"><img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="34" height="34" alt=""></a></dt>
						<dd>
							<div class="pl-1"><span class="name"><a href="forum_news.php?uid=<?=$news_rs['uid']?>" target="_blank"><?=getUserNickName($news_rs['uid'])?></a></span><span class="time"><?=$news_rs['news_addtime']?></span></div>
							<p><?=stripslashes($news_rs['message_text'])?></p>
						</dd>
					</dl>
				</div>
				<div class="bd-pl"><p><a href="trailfootview.php?newsid=<?=$news_rs['newsid']?>" target="_blank"><?=getClassName("kboy_trailfoot","trailfoot_title","id=".$news_rs['newsid'])?></a></p><span class="rect"></span></div>
			</div>
		<?php
				}
		?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
	<!--foot begin-->
	<!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
	<!--左侧悬浮 end-->
	<!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
	<!--右侧悬浮导航 end-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>
